#include"process.h"
#define DOWNLOAD 1024*1024
#define DTIME 1000*10
void download(callback cb)
{
    int ret=DOWNLOAD;
    int total=0;
    while(total<ret)
    {
        usleep(STIME);
        total+=DTIME;
        int rate=total*100/ret;
        cb(rate);
    }
}
int main()
{
    download(process_v2);
    return 0;
}
